import request from '@/utils/request'
// 列表
export const templateList = (data) => {
  return request({
    url: '/code-template/page-list',
    method: 'post',
    data
  })
}

// 删除
export const templateDel = (id) => {
  return request({
    url: `/code-template/delete/${id}`,
    method: 'post'
  })
}

// 下载
export const templateDownload = (id) => {
  return request({
    url: `/code-template/download/${id}`,
    method: 'post',
    responseType: 'blob'
  })
}

// 新增
export const templateAdd = (data) => {
  return request({
    url: '/code-template/add',
    method: 'post',
    data
  })
}
